// 实体类型
import {checkCoachExists} from "@/api/coach";

export interface Coach {
    coachId: number
    coachName: string
    gender: string
    contact?: string
    specialization: string
    introduction: string
    avatar: string
    age: number
    createTime?: string
    updateTime?: string
}

// 分页请求数据
export interface PageCoach {
    coachId?:number | null
    coachName?: string
    contact?: string
    specialization?: string
    page: number
    pageSize: number
}

// 分页请求响应数据
interface PageRespInfo{
    total: number
    records: Coach[]
}

// 分页请求响应
export interface PageResp {
    code: number
    message: string
    data: PageRespInfo
}

// 增加或者删除表单类型
export interface AddAndEditCoach {
    coachId: number
    coachName?: string
    gender?: string
    contact?: string
    specialization?: string
    introduction?: string
    avatar?: string
    age?: number
}

// 增删改响应
export interface AddOrEditOrDelResp {
    code: number
    message?: string
    data?: object
}

// 获取教练响应
export interface GetCoachResp {
    code: number
    message: string
    data: Coach
}

// 检查教练是否存在
export interface ExistsCoachResp {
    code: number
    message?: string
    data: boolean
}


// 客户端
// 分页请求响应数据
interface MemberPageRespInfo{
    total: number
    records: Coach[]
}

export interface MemberPageResp {
    code: number
    message: string
    data: MemberPageRespInfo
}